home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_223 / iff2sun / iff2sun.doc < prev    next >
Text File  |  1992-05-06  |  9KB  |  265 lines

  1.  
  2.      IFF2SUN(1)                  UNIX UTILITIES                  IFF2SUN(1)
  3.  
  4.  
  5.  
  6.  
  7.  
  8.      NAME 
  9.           iff2sun/convert - Amiga to Sun rasterfile conversion program 
  10.  
  11.      SYNOPSIS 
  12.           iff2sun [-chp] [infile] [outfile] 
  13.  
  14.                if infile  is  not specified stdin is used.  if outfile
  15.                is not specified then stdout is used.  
  16.                -c  yields  a  color  rasterfile  (greyscale   is   the
  17.                default).  
  18.                -h switches extra half-bright mode on.  
  19.                -p enables horizontal pixel replication.  This 
  20.                   switch  is  usefull  for  lores  and HAM pictures to
  21.                   offset the aspect ratio difference between  the  two
  22.                   machines (also EHB).  
  23.  
  24.           convert [-c n] [-f] infile outfile 
  25.  
  26.                the  (in/out)files MUST be entered (or you get an error
  27.                message).  
  28.                -c n Set the output  colortable  to  n  entries.    The
  29.                default is 256 colors.  
  30.                -f Use Floyd-Steinberg dithering on the output.  
  31.  
  32.  
  33.      DESCRIPTION 
  34.           IFF2SUN & CONVERT 
  35.  
  36.           What's it  do?  This little guy reads an Amiga IFF ILBM file
  37.           and outputs  Sun  rasterfile  format.    GIGO  (Georgous  In
  38.           Garbage Out).  
  39.  
  40.                For  HAM  pictures  it simply outputs an RGB color file
  41.           that the Sun WILL NOT  UNDERSTAND.  You  then  need  to  run
  42.           another  program  called  convert  to  format  it into a Sun
  43.           rasterfile.  
  44.  
  45.                To properly use  this  program,  you  must  unshar  the
  46.           distribution  and  type  'make'.  Place  the  binaries  in a
  47.           convient directory.  MAKE your executables on  a  Sun!    It
  48.           does  you  very  little  good to try to compile this on your
  49.           Amiga.  
  50.  
  51.                Convert takes a partly converted iff file, generated by
  52.           iff2sun, and converts it the rest of the way  to  produce  a
  53.           Sun rasterfile.    The  only  supported  and  tested  use of
  54.           convert is convert in out.  The  other  documented  switches
  55.           that the program accepts are not tested at this time.  
  56.  
  57.  
  58.      CONVERTING A HAM PICTURE: 
  59.  
  60.                In  order  to  do  conversion  from  a HAM Iff to a Sun
  61.           readable file format, I had to find a routine that would  do
  62.           color  quantization  from  4096 colors to 256. I was able to
  63.  
  64.  
  65.      Checkered Ball                   -1-                       Version 1.4
  66.  
  67.  
  68.      IFF2SUN(1)                  UNIX UTILITIES                  IFF2SUN(1)
  69.  
  70.  
  71.           modify a program released in '82  at  SIGGRAPH  to  do  this
  72.           function.   Unfortuneately,  integrating  this  into iff2sun
  73.           would prove to be too much  trouble.    Instead  I  modified
  74.           iff2sun  to detect when it was working on a HAM picture, and
  75.           do a straight RGB color dump, and  then  use  the  secondary
  76.           program to  finish  doing  the color quantization.  So, when
  77.           you want to do HAM conversion, follow a sequence like this: 
  78.  
  79.                iff2sun -cp porche930 porche930.out 
  80.                convert porche930.out porche930.pic 
  81.  
  82.           The resulting porche930.pic, in this case,  will  be  a  Sun
  83.           readable 8  bit  plane  rasterfile.   You can then go and do
  84.           some dithering or whatever it is that you want to do.  There
  85.           is a supplied script called hamtosun that will do all of the
  86.           standard things to convert a ham picture.  
  87.  
  88.                Iff2sun outputs an 8 bitplane  sun  rasterfile  with  a
  89.           color  table,  (EXCEPT  WHEN A HAM PICTURE IS DETECTED, THEN
  90.           YOU NEED TO RUN CONVERT ) which defaults to shades of  gray.
  91.           Using  the  -c color flag will put the IFF Amiga color table
  92.           into the rasterfile.  If you  want  to  display  this  on  a
  93.           monochrome tube (which is what I have) you should go through
  94.           the folowing steps: 
  95.  
  96.                1> iff2sun inputfile outputfile 
  97.                2> rastrepl outputfile output.bigger 
  98.                3> rasfilter8to1 -d output.bigger output.mono 
  99.  
  100.           The  rastrepl  just pixel replicates the image so that it is
  101.           large enough to see the detail.  you can run  this  as  many
  102.           times  as  you  like, but remember the image quadruples each
  103.           time you use it.  Most sane people will only run it once.  
  104.  
  105.                NOTE: For HAM conversion you NEED  to  include  the  -c
  106.           switch.   The  color  tables are used internally to simulate
  107.           the Amiga HAM mode.  
  108.  
  109.                The rasfilter8to1 program converts the  color  file  (8
  110.           bit  planes) to mono (1 plane) and does some fancy dithering
  111.           (-d).  To prepare an image for a color system, just  include
  112.           the  -c  switch and either display it as it is, or replicate
  113.           it to the desired size first.  
  114.  
  115.                Both the rastrepl and rasfilter8to1 program are part of
  116.           a standard Sun release.  They should  be  included  on  your
  117.           system.  
  118.  
  119.                Using  Extra-half-bright  or  HAM  mode, or any 320x400
  120.           format will produce an image that will looked elongated on a
  121.           Sun screen.  There are  several  ways  to  fix  this.    The
  122.           easiest is to convert your pictures to 640x400 mode and then
  123.           display them.    The second easiest is to rip out 1/3 of the
  124.           horizontal scan lines in the resultant image.  The third  is
  125.           to  have ME write iff2sun to pixel replicate horizontally to
  126.           offset the aspect ratio change.  If the third option is  the
  127.           only one  acceptable  to you, then you are in luck.  All you
  128.           have to do is run iff2sun with the -p switch on the  command
  129.  
  130.  
  131.      Checkered Ball                   -2-                       Version 1.4
  132.  
  133.  
  134.      IFF2SUN(1)                  UNIX UTILITIES                  IFF2SUN(1)
  135.  
  136.  
  137.           line.   You  will  now  get pictures that will look somewhat
  138.           better in this 320 (lo-res) mode.  Remember, the  executable
  139.           at   this  time  only  pixel-replicates  in  the  horizontal
  140.           direction.  That means that a pixel replicated 640  (hi-res)
  141.           image  will  come out 1280x400 before you do anything to it.
  142.           It  is  recommended  that  you  pixel  replicate  your   HAM
  143.           pictures.  
  144.  
  145.  
  146.      Limitations: 
  147.           I  have  only  tested  this  on  DPaintII images, it is very
  148.           possible that it might break with other formats.   Unlikely,
  149.           but possible :*) 
  150.  
  151.  
  152.      Revision History: 
  153.  
  154.           10/31/88   First release, does only simple conversion and no
  155.           color.  
  156.  
  157.           12/88  Re-released with color support.  Unfortunately few if
  158.           any one saw this release (it got lost  on  the  way  to  the
  159.           moderator) This modification is Mark's claim to fame.  
  160.  
  161.           4/26/89   Added  Extra-half-bright support, also looking for
  162.           the best way to convert HAM (4096) to 8  bit  (256)  format.
  163.           Also stuck in the pixel replicating code (trivial).  
  164.  
  165.           5/26/89   Added HAM mode conversion (with convert) and fixed
  166.           an iff parsing bug (parse()), and added new argument parsing
  167.           supplied by Tony Schene. The original convert.c was supplied
  168.           by Tony Kennedy as well  as  the  bug  report  on  DPaintIII
  169.           images.  
  170.  
  171.  
  172.      AUTHORS 
  173.  
  174.  
  175.                This  Program  created  (under  tremendous pressure) by
  176.           Steve Berry with help and modifications  by  Mark  Thompson,
  177.           Tony Schene and Tony Kennedy.  
  178.  
  179.           I hope  you  guys keep it clean.  (If you don't, let me know
  180.           :-) 
  181.  
  182.              Steve Berry ...sun!kilowatt!raz 
  183.              or raz%kilowatt.EBay@sun.com or even BIX: razberry 
  184.  
  185.              Mark Thompson ...decvax!savax!thompson 
  186.  
  187.           ------- 
  188.           This is the revision 2 update information as posted by  Mark
  189.           Thompson.  
  190.  
  191.           Well I said I would do it, so here it is....the modified and
  192.           improved version  of  iff2sun.    The following changes have
  193.           been made: 
  194.  
  195.  
  196.  
  197.      Checkered Ball                   -3-                       Version 1.4
  198.  
  199.  
  200.      IFF2SUN(1)                  UNIX UTILITIES                  IFF2SUN(1)
  201.  
  202.  
  203.           1) Can now convert IFF images  up  to  1024  lines  vertical
  204.           resolution.  
  205.               (horizontal res is still 1024) 
  206.           2) Improved greyscale contrast.  
  207.           3) Now generates a Sun Rasterfile colormap.  
  208.           4) Supports either greyscale or color output.  
  209.  
  210.           As  for  the  problems some people have been having with the
  211.           notorious 'compression messed' error, it seems this  is  due
  212.           to certain implementations of kermit.  Binary mode kermit in
  213.           vt100 on  the  Amiga  does work.  If you don't have any luck
  214.           with this method, uuencode seems to perform flawlessly.  
  215.  
  216.           Mark Thompson 
  217.           decvax!savax!thompson 
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.      Checkered Ball                   -4-                       Version 1.4
  264.  
  265.